home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / pipnss / nsITokenPasswordDialogs.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  115 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsITokenPasswordDialogs.idl
  3.  */
  4.  
  5. #ifndef __gen_nsITokenPasswordDialogs_h__
  6. #define __gen_nsITokenPasswordDialogs_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIInterfaceRequestor; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsITokenPasswordDialogs */
  21. #define NS_ITOKENPASSWORDDIALOGS_IID_STR "be26b580-1dd1-11b2-9946-c598d0d07727"
  22.  
  23. #define NS_ITOKENPASSWORDDIALOGS_IID \
  24.   {0xbe26b580, 0x1dd1, 0x11b2, \
  25.     { 0x99, 0x46, 0xc5, 0x98, 0xd0, 0xd0, 0x77, 0x27 }}
  26.  
  27. /**
  28.  * nsITokenPasswordDialogs
  29.  *  This is the interface for setting and changing password
  30.  *  on a PKCS11 token.
  31.  */
  32. class NS_NO_VTABLE nsITokenPasswordDialogs : public nsISupports {
  33.  public: 
  34.  
  35.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOKENPASSWORDDIALOGS_IID)
  36.  
  37.   /**
  38.    * setPassword - sets the password/PIN on the named token.
  39.    *   The canceled output value should be set to TRUE when
  40.    *   the user (or implementation) cancels the operation.
  41.    */
  42.   /* void setPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out boolean canceled); */
  43.   NS_IMETHOD SetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRBool *canceled) = 0;
  44.  
  45.   /* void getPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out wstring password, out boolean canceled); */
  46.   NS_IMETHOD GetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRUnichar **password, PRBool *canceled) = 0;
  47.  
  48. };
  49.  
  50. /* Use this macro when declaring classes that implement this interface. */
  51. #define NS_DECL_NSITOKENPASSWORDDIALOGS \
  52.   NS_IMETHOD SetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRBool *canceled); \
  53.   NS_IMETHOD GetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRUnichar **password, PRBool *canceled); 
  54.  
  55. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  56. #define NS_FORWARD_NSITOKENPASSWORDDIALOGS(_to) \
  57.   NS_IMETHOD SetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRBool *canceled) { return _to SetPassword(ctx, tokenName, canceled); } \
  58.   NS_IMETHOD GetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRUnichar **password, PRBool *canceled) { return _to GetPassword(ctx, tokenName, password, canceled); } 
  59.  
  60. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  61. #define NS_FORWARD_SAFE_NSITOKENPASSWORDDIALOGS(_to) \
  62.   NS_IMETHOD SetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRBool *canceled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPassword(ctx, tokenName, canceled); } \
  63.   NS_IMETHOD GetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRUnichar **password, PRBool *canceled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(ctx, tokenName, password, canceled); } 
  64.  
  65. #if 0
  66. /* Use the code below as a template for the implementation class for this interface. */
  67.  
  68. /* Header file */
  69. class nsTokenPasswordDialogs : public nsITokenPasswordDialogs
  70. {
  71. public:
  72.   NS_DECL_ISUPPORTS
  73.   NS_DECL_NSITOKENPASSWORDDIALOGS
  74.  
  75.   nsTokenPasswordDialogs();
  76.  
  77. private:
  78.   ~nsTokenPasswordDialogs();
  79.  
  80. protected:
  81.   /* additional members */
  82. };
  83.  
  84. /* Implementation file */
  85. NS_IMPL_ISUPPORTS1(nsTokenPasswordDialogs, nsITokenPasswordDialogs)
  86.  
  87. nsTokenPasswordDialogs::nsTokenPasswordDialogs()
  88. {
  89.   /* member initializers and constructor code */
  90. }
  91.  
  92. nsTokenPasswordDialogs::~nsTokenPasswordDialogs()
  93. {
  94.   /* destructor code */
  95. }
  96.  
  97. /* void setPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out boolean canceled); */
  98. NS_IMETHODIMP nsTokenPasswordDialogs::SetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRBool *canceled)
  99. {
  100.     return NS_ERROR_NOT_IMPLEMENTED;
  101. }
  102.  
  103. /* void getPassword (in nsIInterfaceRequestor ctx, in wstring tokenName, out wstring password, out boolean canceled); */
  104. NS_IMETHODIMP nsTokenPasswordDialogs::GetPassword(nsIInterfaceRequestor *ctx, const PRUnichar *tokenName, PRUnichar **password, PRBool *canceled)
  105. {
  106.     return NS_ERROR_NOT_IMPLEMENTED;
  107. }
  108.  
  109. /* End of implementation class template. */
  110. #endif
  111.  
  112. #define NS_TOKENPASSWORDSDIALOG_CONTRACTID "@mozilla.org/nsTokenPasswordDialogs;1"
  113.  
  114. #endif /* __gen_nsITokenPasswordDialogs_h__ */
  115.